package com.amos.admin.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/index")
@Api(value = "IndexController类的相关的api")
public class IndexController {

    @ApiOperation(value = "测试接口", notes = "测试接口")
    @ApiImplicitParam(name = "name", value = "名称", paramType = "query", required = true, dataType = "String")
    @GetMapping("/sayHi")
    public String sayHi(@RequestParam("name") String name){
        return "Hi "+name+", welcome!";
    }
}
